import request from "@/utils/request";

// 查询列表
export function listContract(query) {
  return request({
    url: "/system/contract/list",
    method: "get",
    params: query,
  });
}
// 查询所有交易类型
export function listAllTransaction(query) {
  return request({
    url: "/system/contract/transactionType/listAll",
    method: "get",
    params: query,
  });
}
//新增
export function addContract(data) {
  return request({
    url: "/system/contract",
    method: "post",
    data,
  });
}
//获取大写金额
export function getCalLetter(query) {
  return request({
    url: "/common/amountCapital",
    method: "get",
    params: query,
  });
}
// 查看详情
export function queryContract(id) {
  return request({
    url: "/system/contract/" + id,
    method: "get",
  });
}
//编辑
export function editContract(data) {
  return request({
    url: "/system/contract",
    method: "put",
    data,
  });
}
//删除
export function delContract(id) {
  return request({
    url: "/system/contract/" + id,
    method: "delete",
  });
}
//获取省市区
export function getRegionList(query) {
  return request({
    url: "/system/region/getList",
    method: "get",
    params: query,
  });
}
